namespace SinaFinance.ChartLibrary.AxisLibrary
{
    using SinaFinance;
    using SinaFinance.CtrlDelegate;
    using SinaFinanceBaseClassLibrary;
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.Runtime.CompilerServices;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Threading;

    public partial class TimeSharingAxis : UserControl
    {
        //private bool _contentLoaded;
        private List<TimeSharingPoint> AveragePoints;
        private DateTime BeginTimeAM = Convert.ToDateTime("09:30:00");
        private DateTime BeginTimePM = Convert.ToDateTime("13:00:00");
        private double bottomSpan = 20.0;
        private Color COLOR1 = Color.FromArgb(0xff, 4, 0xde, 0xd7);
        private Color COLOR2 = Color.FromArgb(0xff, 0xd9, 0x73, 7);
        private CompareEventHanlder doCompare;
        private DoQueryEventHanlder doQuery;
        private System.EventHandler doSearch;
        private DateTime EndTimeAM = Convert.ToDateTime("11:30:00");
        private DateTime EndTimePM = Convert.ToDateTime("15:00:00");
        public bool isAfterDataBinding = false;
        private bool isCompared = false;
        public bool isDataCorrect = true;
        private bool isFullScreem = true;
        private bool isKLineChartOnload = true;
        private bool isTimeSharingChartOnload = true;
        //internal Grid LayoutRoot;
        private double leftSpan = 65.0;
        private Legend lengend;
        private loading loadBar;
        private Dictionary<string, List<TimeSharingPoint>> PercentPoints;
        private const string removedTimePoint1 = "09:29:00";
        private const string removedTimePoint2 = "12:59:00";
        private const string removedTimePoint3 = "13:00:00";
        private Review reviewArea = new Review();
        private double rightSpan = 65.0;
        //internal Canvas rootCanvas;
        private List<string> settleMents = new List<string>();
        private string stockCNNumbers = string.Empty;
        private string stockNumber = string.Empty;
        private TextBlock tblExceptionInfo = new TextBlock();
        private DispatcherTimer timer = new DispatcherTimer();
        private double TimeSharingHeightPercent = 0.66666666666666663;
        private List<string> TimeSharingLeftYaxisDatalist = new List<string>();
        private List<TimeSharingPoint> TimeSharingPoints;
        private List<string> TimeSharingRightYaxisDatalist = new List<string>();
        private double topSpan = 20.0;
        private double VolumnAxisHeightPercent = 0.33333333333333331;
        private List<string> VolumnYAxisTips = new List<string>();

        public event CompareEventHanlder DoCompare
        {
            [MethodImpl(MethodImplOptions.Synchronized)] add
            {
                this.doCompare = (CompareEventHanlder)Delegate.Combine((Delegate)this.doCompare, (Delegate)value);
            }
            [MethodImpl(MethodImplOptions.Synchronized)] remove
            {
                this.doCompare = (CompareEventHanlder)Delegate.Remove((Delegate)this.doCompare, (Delegate)value);
            }
        }

        public event DoQueryEventHanlder DoQuery
        {
            [MethodImpl(MethodImplOptions.Synchronized)] add
            {
                this.doQuery = (DoQueryEventHanlder)Delegate.Combine((Delegate)this.doQuery, (Delegate)value);
            }
            [MethodImpl(MethodImplOptions.Synchronized)] remove
            {
                this.doQuery = (DoQueryEventHanlder)Delegate.Remove((Delegate)this.doQuery, (Delegate)value);
            }
        }

        public event System.EventHandler DoSearch
        {
            [MethodImpl(MethodImplOptions.Synchronized)] add
            {
                this.doSearch = (System.EventHandler)Delegate.Combine((Delegate)this.doSearch, (Delegate)value);
            }
            [MethodImpl(MethodImplOptions.Synchronized)] remove
            {
                this.doSearch = (System.EventHandler)Delegate.Remove((Delegate)this.doSearch, (Delegate)value);
            }
        }

        public TimeSharingAxis()
        {
            this.InitializeComponent();
            if (base.Width <= 0.0)
            {
                base.Width = 600.0;
            }
            if (base.Height <= 0.0)
            {
                base.Height = 400.0;
            }
            this.rootCanvas.Width = base.Width;
            this.rootCanvas.Height = base.Height;
            this.AddLoadingToCanvas();
            base.Loaded += new RoutedEventHandler(this.TimeSharingAxis_Loaded);
        }

        private void AddLoadingToCanvas()
        {
            this.loadBar = new loading();
            //this.loadBar.Margin = new Thickness(base.Width / 2.0, (base.Height / 2.0) - (this.loadBar.Height / 2.0), 0.0, 0.0);
            this.rootCanvas.Children.Add(this.loadBar);
        }

        private void area_DoCompare(object sender, RoutedEventArgs e)
        {
            if (this.doCompare != null)
            {
                this.doCompare(sender, e);
            }
        }

        private void area_DoQuery(object sender, RoutedEventArgs e)
        {
            if (this.doQuery != null)
            {
                this.doQuery(sender, e);
            }
        }

        private void area_DoSearch(object sender, EventArgs e)
        {
            if (this.doSearch != null)
            {
                this.doSearch(sender, e);
            }
        }

        private void area_ShowOrHiddenReview(object sender, MouseEventArgs e)
        {
            if (!this.rootCanvas.Children.Contains(this.reviewArea))
            {
                this.rootCanvas.Children.Add(this.reviewArea);
                if (!this.isCompared)
                {
                    this.reviewArea.Margin = new Thickness(0.0, base.Height - 80.0, 0.0, 0.0);
                }
                else
                {
                    this.reviewArea.Margin = new Thickness(0.0, base.Height - 180.0, 0.0, 0.0);
                }
            }
            else
            {
                this.rootCanvas.Children.Remove(this.reviewArea);
            }
        }

        private List<TimeSharingPoint> CompletePointList(DateTime beginTime, int standardPointCount, TimeSharingPoint startPoint, List<TimeSharingPoint> Points)
        {
            DateTime time = beginTime;
            for (int i = 0; i < standardPointCount; i++)
            {
                if (Points.Count > i)
                {
                    startPoint = Points[i];
                }
                else
                {
                    startPoint = Points[(int) (Points.Count - 1)];
                }
                DateTime time2 = Convert.ToDateTime(startPoint.XInfo);
                if (time != time2)
                {
                    TimeSharingPoint point = new TimeSharingPoint {
                        XInfo = time.ToString("HH:mm"),
                        YInfo = (i > 0) ? Points[(int) (i - 1)].YInfo : Points[0].YInfo,
                        VolumnInfo = "0",
                        StockId = (i > 0) ? Points[(int) (i - 1)].StockId : Points[0].StockId,
                        StockName = (i > 0) ? Points[(int) (i - 1)].StockName : Points[0].StockName,
                        PointType = (i > 0) ? Points[(int) (i - 1)].PointType : Points[0].PointType
                    };
                    Points.Insert(i, point);
                }
                time = time.AddMinutes((double) 1.0);
            }
            return Points;
        }

        protected void DataBinding()
        {
            try
            {
                this.loadBar.Visibility = Visibility.Visible;
                DB_SinaDataHelp help = new DB_SinaDataHelp();
                help.GetMarketBaseDataCompleted += new GetMarketBaseDataHelp(this.Dsdh_GetMarketBaseDataCompleted);
                help.GetMarketBaseData(this.stockNumber);
            }
            catch
            {
            }
        }

        private void Dsdh_DrawTimeSharingChartCompleted(Dictionary<string, List<DB_MinLine>> _DB_MinLinelist, string result)
        {
            ComparationArea area = new ComparationArea {
                Margin = new Thickness(0.0, base.Height - 15.0, 0.0, 0.0)
            };
            area.SetValue(Canvas.ZIndexProperty, 50);
            area.DoSearch += new System.EventHandler(this.area_DoSearch);
            area.DoQuery += new ComparationArea.DoQueryEventHanlder(this.area_DoQuery);
            area.DoCompare += new ComparationArea.CompareEventHanlder(this.area_DoCompare);
            area.ShowOrHiddenReview += new ComparationArea.ShowOrHiddenReviewAreaHandler(this.area_ShowOrHiddenReview);
            this.rootCanvas.Children.Add(area);
            if ((_DB_MinLinelist == null) || _DB_MinLinelist.Count.Equals(0))
            {
                this.isDataCorrect = false;
                this.tblExceptionInfo.Text = "数据服务请求发生异常，或当前股票已退市";
                this.tblExceptionInfo.Foreground = new SolidColorBrush(Colors.Red);
                this.isDataCorrect = false;
                this.loadBar.Visibility = Visibility.Collapsed;
            }
            else
            {
                int num;
                TimeSharingPoint point;
                PointTypeEnum timeSharing;
                IEnumerator enumerator = (IEnumerator) _DB_MinLinelist.Keys.GetEnumerator();
                if (_DB_MinLinelist.Keys.Count.Equals(1))
                {
                    this.isCompared = false;
                    while (enumerator.MoveNext())
                    {
                        string str = enumerator.Current.ToString();
                        if (_DB_MinLinelist[str].Count.Equals(0))
                        {
                            this.isDataCorrect = false;
                            this.tblExceptionInfo.Text = "数据服务请求发生异常，或当前股票已退市";
                            this.tblExceptionInfo.Foreground = new SolidColorBrush(Colors.Red);
                            this.isDataCorrect = false;
                            this.loadBar.Visibility = Visibility.Collapsed;
                            return;
                        }
                        DB_Transition.DB_InitSingleTimeSharingPointsInfo(_DB_MinLinelist[str], this.settleMents, out this.TimeSharingPoints, out this.TimeSharingLeftYaxisDatalist, out this.AveragePoints, out this.TimeSharingRightYaxisDatalist, out this.VolumnYAxisTips);
                        num = this.TimeSharingPoints.Count - 1;
                        while (num > -1)
                        {
                            point = this.TimeSharingPoints[num];
                            if (this.isErrorPoint(point.XInfo))
                            {
                                this.TimeSharingPoints.RemoveAt(num);
                            }
                            num--;
                        }
                        num = this.AveragePoints.Count - 1;
                        while (num > -1)
                        {
                            point = this.AveragePoints[num];
                            if (this.isErrorPoint(point.XInfo))
                            {
                                this.AveragePoints.RemoveAt(num);
                            }
                            num--;
                        }
                        num = this.rootCanvas.Children.Count - 1;
                        while (num >= 0)
                        {
                            if (this.rootCanvas.Children[num].GetType().ToString().Equals("SinaFinance.ChartLibrary.AxisLibrary.VolumnAxis") || this.rootCanvas.Children[num].GetType().ToString().Equals("SinaFinance.ChartLibrary.AxisLibrary.TimeSharingLineAxis"))
                            {
                                this.rootCanvas.Children.Remove(this.rootCanvas.Children[num]);
                            }
                            num--;
                        }
                        timeSharing = PointTypeEnum.TimeSharing;
                        this.RenderTimeSharingControl(timeSharing);
                        this.RenderVolumnControl();
                    }
                }
                if (_DB_MinLinelist.Keys.Count.Equals(2))
                {
                    this.isCompared = true;
                    if (this.PercentPoints != null)
                    {
                        this.PercentPoints.Clear();
                    }
                    List<string> list = new List<string>();
                    Dictionary<string, List<TimeSharingPoint>> dictionary = new Dictionary<string, List<TimeSharingPoint>>();
                    DB_Transition.DB_InitDoubleTimeSharingPointsInfo(_DB_MinLinelist, this.settleMents, out this.TimeSharingLeftYaxisDatalist, out this.PercentPoints);
                    IEnumerator enumerator2 = (IEnumerator) this.PercentPoints.Keys.GetEnumerator();
                    while (enumerator2.MoveNext())
                    {
                        List<TimeSharingPoint> list2 = this.PercentPoints[enumerator2.Current.ToString()];
                        for (num = list2.Count - 1; num > -1; num--)
                        {
                            point = list2[num];
                            if (this.isErrorPoint(point.XInfo))
                            {
                                list2.RemoveAt(num);
                            }
                        }
                    }
                    timeSharing = PointTypeEnum.Percent;
                    this.RenderTimeSharingControl(timeSharing);
                    double num2 = base.Height * this.VolumnAxisHeightPercent;
                    double width = base.Width;
                    Canvas canvas = new Canvas {
                        Width = width,
                        Height = num2
                    };
                    LinearGradientBrush brush = new LinearGradientBrush();
                    GradientStop stop = new GradientStop();
                    GradientStop stop2 = new GradientStop();
                    stop.Color = Color.FromArgb(0xff, 0x13, 0x1b, 0x29);
                    stop.Offset = 0.0;
                    stop2.Color = Color.FromArgb(0xff, 0x1c, 0x2e, 0x41);
                    stop2.Offset = 1.0;
                    brush.StartPoint = new Point(0.0, 0.0);
                    brush.EndPoint = new Point(0.0, 1.0);
                    brush.GradientStops.Add(stop);
                    brush.GradientStops.Add(stop2);
                    canvas.Background = brush;
                    canvas.Margin = new Thickness(0.0, base.Height * this.TimeSharingHeightPercent, 0.0, 0.0);
                    this.rootCanvas.Children.Add(canvas);
                }
                if (this.isFullScreem)
                {
                    this.reviewArea.RemoveReviewArea += new Review.ShutDownReviewArea(this.reviewArea_RemoveReviewArea);
                    if (!this.stockNumber.Trim().Equals(string.Empty))
                    {
                        if (this.stockNumber.IndexOf(',') > -1)
                        {
                            string[] strArray = this.stockNumber.Split(new char[] { ',' });
                            if (this.lengend == null)
                            {
                                this.lengend = new Legend(this.COLOR1, strArray[0], this.COLOR2, strArray[1]);
                                this.lengend.SetValue(Canvas.ZIndexProperty, 500);
                                this.lengend.Margin = new Thickness(65.0, 0.0, 0.0, 0.0);
                                this.rootCanvas.Children.Add(this.lengend);
                            }
                            area.MainStockID = strArray[0];
                            area.ComparedStockID = strArray[1];
                            this.reviewArea.Margin = new Thickness(this.reviewArea.Margin.Left, this.reviewArea.Margin.Top - 100.0, this.reviewArea.Margin.Right, this.reviewArea.Margin.Bottom);
                            area.Margin = new Thickness(area.Margin.Left, area.Margin.Top - 100.0, area.Margin.Right, area.Margin.Bottom);
                        }
                        else
                        {
                            area.MainStockID = this.stockNumber;
                        }
                        this.isAfterDataBinding = true;
                    }
                }
            }
        }

        private void Dsdh_GetMarketBaseDataCompleted(List<DB_RealTime> _DB_RealTime, string result)
        {
            if ((_DB_RealTime == null) || _DB_RealTime.Count.Equals(0))
            {
                this.isDataCorrect = false;
                this.tblExceptionInfo.Text = "数据服务请求发生异常，或当前股票已退市";
                this.tblExceptionInfo.Foreground = new SolidColorBrush(Colors.Red);
                this.isDataCorrect = false;
                this.loadBar.Visibility = Visibility.Collapsed;
            }
            else
            {
                for (int i = 0; i < _DB_RealTime.Count; i++)
                {
                    this.settleMents.Add(_DB_RealTime[i].Settlement);
                }
                this.Initial_TimeSharingAndVolumnChartDataSource(this.isTimeSharingChartOnload);
            }
        }

        private List<TimeSharingPoint> FixLostTimeSharingPoints(List<TimeSharingPoint> pointList, DateTime EndTime)
        {
            List<TimeSharingPoint> points = new List<TimeSharingPoint>();
            List<TimeSharingPoint> list2 = new List<TimeSharingPoint>();
            List<TimeSharingPoint> list3 = new List<TimeSharingPoint>();
            if ((pointList != null) && !pointList.Count.Equals(0))
            {
                int num3;
                if (EndTime <= this.BeginTimeAM)
                {
                    return list3;
                }
                IEnumerator enumerator = (IEnumerator) pointList.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    TimeSharingPoint point = (TimeSharingPoint) enumerator.Current;
                    DateTime time = Convert.ToDateTime(point.XInfo);
                    if ((time >= this.BeginTimeAM) && (time <= this.EndTimeAM))
                    {
                        points.Add(point);
                    }
                    if (time >= this.BeginTimePM)
                    {
                        list2.Add(point);
                    }
                }
                TimeSpan span = new TimeSpan();
                TimeSpan span2 = new TimeSpan();
                if (EndTime <= this.EndTimeAM)
                {
                    span = (TimeSpan) (EndTime - this.BeginTimeAM);
                }
                else
                {
                    span = (TimeSpan) (this.EndTimeAM - this.BeginTimeAM);
                }
                if (EndTime > this.BeginTimePM)
                {
                    span2 = (TimeSpan) (EndTime - this.BeginTimePM);
                }
                int standardPointCount = ((span.Hours * 60) + span.Minutes) + 1;
                int num2 = (span2.Hours * 60) + span2.Minutes;
                TimeSharingPoint startPoint = (points.Count > 0) ? points[0] : list2[0];
                if ((standardPointCount > 0) && points.Count.Equals(0))
                {
                    points.Add(startPoint);
                }
                if (!((standardPointCount <= 0) || points.Count.Equals(0)))
                {
                    this.CompletePointList(this.BeginTimeAM, standardPointCount, startPoint, points);
                }
                if ((num2 > 0) && list2.Count.Equals(0))
                {
                    list2.Add(startPoint);
                }
                if (!((num2 <= 0) || list2.Count.Equals(0)))
                {
                    this.CompletePointList(this.BeginTimePM.AddMinutes((double) 1.0), num2, startPoint, list2);
                }
                for (num3 = 0; num3 < points.Count; num3++)
                {
                    list3.Add(points[num3]);
                }
                for (num3 = 0; num3 < list2.Count; num3++)
                {
                    list3.Add(list2[num3]);
                }
            }
            return list3;
        }

        protected void Initial_TimeSharingAndVolumnChartDataSource(bool isOnload)
        {
            try
            {
                DB_SinaDataHelp help = new DB_SinaDataHelp();
                help.GetMinLineListCompleted += new TimeSharingHandler(this.Dsdh_DrawTimeSharingChartCompleted);
                help.GetMinLineList(this.stockNumber);
            }
            catch
            {
            }
        }

        //[DebuggerNonUserCode]
        //public void InitializeComponent()
        //{
        //    if (!this._contentLoaded)
        //    {
        //        this._contentLoaded = true;
        //        Application.LoadComponent(this, new Uri("/SinaFinance;component/ChartLibrary/AxisLibrary/TimeSharingAxis.xaml", UriKind.Relative));
        //        this.LayoutRoot = (Grid) base.FindName("LayoutRoot");
        //        this.rootCanvas = (Canvas) base.FindName("rootCanvas");
        //    }
        //}

        private bool isErrorPoint(string timeInfo)
        {
            DateTime time = Convert.ToDateTime(timeInfo);
            if (time >= this.BeginTimeAM)
            {
                if ((time >= this.BeginTimeAM) && (time <= this.EndTimeAM))
                {
                    return false;
                }
                if ((time > this.EndTimeAM) && (time <= this.BeginTimePM))
                {
                    return true;
                }
                if ((time > this.BeginTimePM) && (time <= this.EndTimePM))
                {
                    return false;
                }
            }
            return true;
        }

        private void RenderTimeSharingControl(PointTypeEnum type)
        {
            string str = IntervalUpdates.ts_IntervalTime;
            DateTime time = Convert.ToDateTime(str);
            if (time <= Convert.ToDateTime(this.BeginTimeAM))
            {
                str = this.BeginTimeAM.ToString("HH:mm");
            }
            if ((time >= Convert.ToDateTime(this.EndTimeAM)) && (time <= Convert.ToDateTime(this.BeginTimePM)))
            {
                str = this.EndTimeAM.ToString("HH:mm");
            }
            if (time >= Convert.ToDateTime(this.EndTimePM))
            {
                str = this.EndTimePM.ToString("HH:mm");
            }
            if (type.Equals(PointTypeEnum.TimeSharing))
            {
                this.TimeSharingPoints = this.FixLostTimeSharingPoints(this.TimeSharingPoints, Convert.ToDateTime(str));
                this.AveragePoints = this.FixLostTimeSharingPoints(this.AveragePoints, Convert.ToDateTime(str));
            }
            if (type.Equals(PointTypeEnum.Percent))
            {
                Dictionary<string, List<TimeSharingPoint>> dictionary = new Dictionary<string, List<TimeSharingPoint>>();
                IEnumerator enumerator = (IEnumerator) this.PercentPoints.Keys.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    string str2 = enumerator.Current.ToString();
                    List<TimeSharingPoint> pointList = this.PercentPoints[str2];
                    pointList = this.FixLostTimeSharingPoints(pointList, Convert.ToDateTime(str));
                    dictionary.Add(str2, pointList);
                }
                this.PercentPoints.Clear();
                this.PercentPoints = dictionary;
            }
            TimeSharingLineAxis axis = new TimeSharingLineAxis();
            double num = base.Height * this.TimeSharingHeightPercent;
            double width = base.Width;
            axis.Width = width;
            axis.Height = num;
            axis.TopSpan = this.topSpan;
            axis.BottomSpan = this.bottomSpan;
            axis.LeftSpan = this.leftSpan;
            axis.RightSpan = this.rightSpan;
            axis.LeftYAxisTips = this.TimeSharingLeftYaxisDatalist;
            axis.RightYAxisTips = this.TimeSharingRightYaxisDatalist;
            axis.TimeSharingPoints = this.TimeSharingPoints;
            axis.AveragePoints = this.AveragePoints;
            axis.PercentPoint = this.PercentPoints;
            axis.Margin = new Thickness(0.0, 0.0, 0.0, 0.0);
            axis.Type = type;
            axis.IsOnload = this.isTimeSharingChartOnload;
            if (axis.Type.Equals(PointTypeEnum.Percent))
            {
                axis.Color1 = this.COLOR1;
                axis.Color2 = this.COLOR2;
            }
            axis.CurrentStockID = this.stockNumber;
            this.rootCanvas.Children.Add(axis);
            this.isTimeSharingChartOnload = false;
        }

        private void RenderVolumnControl()
        {
            VolumnAxis axis = new VolumnAxis {
                ColumnTypeEnum = ColumnTypeEnum.TimeSharing
            };
            double num = base.Height * this.VolumnAxisHeightPercent;
            double width = base.Width;
            axis.IsOnload = this.isKLineChartOnload;
            axis.Width = width;
            axis.Height = num;
            axis.TopSpan = this.topSpan;
            axis.BottomSpan = this.bottomSpan;
            axis.LeftSpan = this.leftSpan;
            axis.RightSpan = this.rightSpan;
            axis.YaxisDatalist = this.VolumnYAxisTips;
            axis.TimeSharingPoints = this.TimeSharingPoints;
            this.rootCanvas.Children.Add(axis);
            axis.Margin = new Thickness(0.0, base.Height * this.TimeSharingHeightPercent, 0.0, 0.0);
            this.isKLineChartOnload = false;
        }

        private void reviewArea_RemoveReviewArea(object sender, MouseEventArgs e)
        {
            if (this.rootCanvas.Children.Contains(this.reviewArea))
            {
                this.rootCanvas.Children.Remove(this.reviewArea);
            }
        }

        private void timer_Tick(object sender, EventArgs e)
        {
            if (((DateTime.Now.TimeOfDay >= TimeSpan.Parse("9:31")) && (DateTime.Now.TimeOfDay <= TimeSpan.Parse("11:30"))) || ((DateTime.Now.TimeOfDay >= TimeSpan.Parse("13:00")) && (DateTime.Now.TimeOfDay <= TimeSpan.Parse("15:00"))))
            {
                this.isAfterDataBinding = false;
                this.Initial_TimeSharingAndVolumnChartDataSource(this.isTimeSharingChartOnload);
            }
        }

        private void TimeSharingAxis_Loaded(object sender, RoutedEventArgs e)
        {
            this.isAfterDataBinding = false;
            this.rootCanvas.Children.Add(this.tblExceptionInfo);
            this.DataBinding();
            this.timer.Interval = new TimeSpan(0, 0, 0x41);
            this.timer.Tick += new System.EventHandler(this.timer_Tick);
            this.timer.Start();
        }

        public bool IsFullScreem
        {
            get
            {
                return this.isFullScreem;
            }
            set
            {
                this.isFullScreem = value;
            }
        }

        public string StockCNNumbers
        {
            get
            {
                return this.stockCNNumbers;
            }
            set
            {
                this.stockCNNumbers = value;
            }
        }

        public string StockNumber
        {
            get
            {
                return this.stockNumber;
            }
            set
            {
                this.stockNumber = value;
            }
        }

        public delegate void CompareEventHanlder(object sender, RoutedEventArgs e);

        public delegate void DoQueryEventHanlder(object sender, RoutedEventArgs e);

        public delegate void EventHanlder(object sender, MouseEventArgs e);
    }
}
